package com.logos.blog.base.exception;

/**
 * @author logos
 * date 2025/7/5 19:28
 * @version v1.0
 * @Package com.logos.blog.base.exception
 */
public class BizException extends RuntimeException{

    private ErrorCode errorCode;

    public BizException(ErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

    public BizException(String message, ErrorCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }
}
